package com.factoryabstract;

public class Main {
    public static void main(String[] args) {
        AbstractFactory modenFactory = new ModenFactory();
        Vehicle car = modenFactory.createVehicle();
        Weapon ak47 = modenFactory.createWeapon();
        Food bread = modenFactory.createFood();
        car.go();
        ak47.shoot();
        bread.printName();

        AbstractFactory magicFactory = new MagicFactory();
        Vehicle broom = magicFactory.createVehicle();
        Food mushroom = magicFactory.createFood();
        Weapon magicstick = magicFactory.createWeapon();
        broom.go();
        mushroom.printName();
        magicstick.shoot();
    }
}
